struct TetrisPiece
{
    int spriteIDs[4];
};

namespace TetrisConstants
{
    static const int boardWidth = 8;
    static const int boardHeight = 12;
    static const int pieceCount = 5;
}

class GameTetrisBasic : public Game
{
public:
    void Init();
    string Name()
    {
        return "tetrisBasic";
    }
    void NewGame();
    void Step(ControllerState &controller);
    ControllerState SimpleAI();

private:
    void NewPiece();
    void MakeFrameSprites();

    vector<TetrisPiece> _pieces;

    //
    // Game state
    //
    Vec2i _piecePos;
    int _startFrame;
    int _pieceType;
    int _score;
    int _rotation;
    Grid<int> _tiles;

    int _spriteBlock;
};
